from _pari.core import *
from _pari import *

I = I()
Euler = Euler()
Pi = Pi()

def var(name):
    v = _pari.var(name)
    globals()[name] = v
    return v

def real_prec(v = None):
    if v!=None:
        _pari.real_prec(v)
        global Euler
        Euler = _pari.core.Euler()
        global Pi
        Pi = _pari.core.Pi()
    else:
        return _pari.real_prec()

def ser_prec(v = None):
    if v!=None:
        _pari.ser_prec(v)
    else:
        return _pari.ser_prec()

pari_for = globals()['for']
del globals()['for']
#pari_abs = globals()['abs']
#del globals()['abs']

